                    <div class="table">    
                        <div class="action">
                            <h5>
								Rekap Cheque No Rekening. <?=$this->session->userdata('cheque_acc')?> <br />
                                PT. Bayu Buana Gemilang <br />
                                Periode <?=indonesian_date($this->session->userdata('cheque_day'))?> 
                                s/d <?=indonesian_date($this->session->userdata('cheque_day2'))?>
							</h5>
			         	</div>
                        
						<table>
							<thead>
								<tr>
									<th><?=lang('no')?></th>
                                    <th><?=lang('date')?></th>
                                    <th><?=lang('information')?></th>
                                    <th><?=lang('supplier')?></th>
                                    <th><?=lang('dept')?></th>
                                    <th><?=lang('detail')?></th>
                                    <th><?=lang('total')?></th>
                                    <th><?=lang('cheque')?></th>
								</tr>
							</thead>
							<tbody>
                                <?php $i=1;?>
                                <?php foreach($cheques as $row): ?>
                                <?php $value = $this->cheques->getChequePayment($row['NomorCek']);?>
                                <?php 
                                    $j=1;
                                    $bayar = 0;
                                    foreach($value as $val): ?>
                                    <?php $sum = $this->cheques->getCountCheque($row['NomorCek']); ?>
                                    <?php
                                        if($j==$sum['jml_cek']):
				                            $bayar      =   $sum['total_payment'];
				                            $nomor_cek  =   $row['NomorCek'];
                        				else:
                        					$bayar     =    "";
                        					$nomor_cek =    "";
                        				endif;
                                    ?>
                                <tr>
                                    <td style="width:2%;;text-align:left"><?=$i?></td>
                                    <td style="width:7%;;text-align:left"><?=$row['Tanggal']?></td>
                                    <td style="width:30%;text-align:left"><?=$val['Uraian']?></td>
                                    <td><?=$val['Penerima']?></td>
                                    <td><?=$val['DeptId']?></td>
                                    <td class="right"><?=decimal($val['Payment'],2);?></td>
                                    <td class="right"><?=decimal($bayar,2);?></td>
                                    <td style="width:9%;"><?=$nomor_cek?></td>
                                </tr>
                                <?php
                                    $j++;
                                    $i++;
                                    endforeach; 
                                    endforeach;?>
							</tbody>
						</table>
					</div>